Release 10.1A: OpenEdge Development:
Programming Interfaces
Writing a ProDataSet definition to XML Schema files
Temp-table members of a ProDataSet can have a
NAMESPACE-URIattribute that differs from theNAMESPACE-URIof the ProDataSet. In this case, theWRITE-XMLSCHEMA()method uses a separate XML Schema document for the temp-table definition, since the XML SchemaTargetNamespaceattribute is different.In other words, suppose your ProDataSet has three temp-table buffers. The ProDataSet defines a default namespace. The first temp-table buffer does not define a default namespace, so it, therefore, uses the default namespace defined by its parent ProDataSet. The second temp-table buffer defines the same default namespace as the ProDataSet. So far, only a single XML Schema file is needed because only one namespace has been used. Suppose the third temp-table buffer defines a different default namespace. The method now needs to create a second XML Schema file for this temp-table buffer.
This code sample demonstrates the ability of the
WRITE-XMLSCHEMA()method to write different XML Schema files for different namespaces:Here is an abbreviated version of the include file that sets up the ProDataSet. Note the variety of namespaces used:
Here is the code. Note that only a single target file name is specified:
This is the standard Open dialog box set up to show
*.xsdfiles in the working directory:
![]()
The method call created four
.xsdfiles. It used the specified file name as the main ProDataSet-level XML Schema file. It also used the name as a root for naming other.xsdfiles it needed to create for temp-table buffers with different namespaces.When reading this XML Schema, an application would find the child XML schemas from the
importdirectives in the in the main XML Schema. For example, here is a snippet ofprodataset.xsdshowing the imports:
Note: This feature works exclusively when writing XML Schema documents to operating system files (target-type
“FILE”), otherwise it returns an error.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |